package psu.se.soft;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity {
    
	private EditText studentId;
	private Button login;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        studentId = (EditText)findViewById(R.id.studentId);
        login = (Button)findViewById(R.id.login);
        
        login.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				 if(studentId.getText().toString().equals("")) {
			        	Toast.makeText(getApplicationContext(), "Please Enter Your Student ID", 
			        			Toast.LENGTH_SHORT).show();
				 } else {
					 Intent intent = new Intent(getApplicationContext(), Profile.class);
					 startActivity(intent);
			     }
			}
		});  
    }
}